<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of dodecahedron</title>
  <meta name="keywords" content="dodecahedron">
  <meta name="description" content="dodecahedron(g) --- overwrite g with the dodecahedron graph">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">matgraph</a> &gt; <a href="index.html">@graph</a> &gt; dodecahedron.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for matgraph/@graph&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>dodecahedron
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>dodecahedron(g) --- overwrite g with the dodecahedron graph</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function dodecahedron(g) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> dodecahedron(g) --- overwrite g with the dodecahedron graph</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="add.html" class="code" title="function add(g,i,j)">add</a>	add --- add edge(s) to the graph</li><li><a href="clear_edges.html" class="code" title="function clear_edges(g)">clear_edges</a>	clear_edges(g) --- delete all edges of g</li><li><a href="embed.html" class="code" title="function embed(g,xy)">embed</a>	embed --- create an embedding for a graph</li><li><a href="full.html" class="code" title="function full(g)">full</a>	full(g) --- convert internal storage for g to full</li><li><a href="resize.html" class="code" title="function resize(g, n)">resize</a>	resize(g,n) --- change the number of vertices in g to n</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function dodecahedron(g)</a>
0002 <span class="comment">% dodecahedron(g) --- overwrite g with the dodecahedron graph</span>
0003 
0004 <a href="resize.html" class="code" title="function resize(g, n)">resize</a>(g,20)
0005 <a href="clear_edges.html" class="code" title="function clear_edges(g)">clear_edges</a>(g)
0006 <a href="full.html" class="code" title="function full(g)">full</a>(g)
0007 
0008 elist = [
0009     1   2
0010     1   5
0011     1   6
0012     2   3
0013     2   7
0014     3   4
0015     3   8
0016     4   5
0017     4   9
0018     5   10
0019     6   11
0020     6   15
0021     7   11
0022     7   12
0023     8   12
0024     8   13
0025     9   13
0026     9   14
0027     10  14
0028     10  15
0029     11  16
0030     12  17
0031     13  18
0032     14  19
0033     15  20
0034     16  17
0035     16  20
0036     17  18
0037     18  19
0038     19  20
0039     ];
0040 
0041 <a href="add.html" class="code" title="function add(g,i,j)">add</a>(g,elist);
0042 
0043 t0 = 0;
0044 t1 = -2*pi/5;
0045 t2 = 2*t1;
0046 t3 = 3*t1;
0047 t4 = 4*t1;
0048 
0049 ring1 = [
0050     sin(t0)     cos(t0)
0051     sin(t1)     cos(t1)
0052     sin(t2)     cos(t2)
0053     sin(t3)     cos(t3)
0054     sin(t4)     cos(t4)
0055     ];
0056 
0057 ring2 = ring1 * [cos(t1/2),-sin(t1/2);sin(t1/2),cos(t1/2)];
0058 
0059 xy = [
0060     4*ring1;
0061     3*ring1;
0062     2*ring2;
0063     ring2
0064     ];
0065 
0066 <a href="embed.html" class="code" title="function embed(g,xy)">embed</a>(g,xy)</pre></div>
<hr><address>Generated on Fri 30-Apr-2010 07:51:16 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>